﻿package com.athena.controller 
{
	import com.athena.vo.ObjectRoom;
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	import flash.text.TextFormat;
	import com.athena.process.ProcessOutTable_Frame2;

	/**
	 * ...
	 * @author Tamnt
	 */
	public class RoomController 
	{
		var m_movie_mc:MovieClip;
		var objR:ObjectRoom;
		public function RoomController(_mc:MovieClip,_obj:ObjectRoom) 
		{
			objR = _obj;
			m_movie_mc = _mc
			m_movie_mc.header_txt.text = _obj.RoomName + " (" + objR.CurrPlayer + " người)";			
			var formatText : TextFormat = new TextFormat() ;				
			formatText.font = "Tahoma" ;
			formatText.bold = true ;
			formatText.size = 12 ;
			m_movie_mc.header_txt.setTextFormat(formatText) ;
			//ASMain.tf.appendText("==>AddList") ;
			m_movie_mc.addEventListener(MouseEvent.CLICK, movie_mc_click);
		}
		function movie_mc_over(evt:MouseEvent)
		{
			//m_movie_mc.btnBg_mc.gotoAndStop(1);
			//movie_mc.btn_mc.effect_mc.play();
			//movie_mc.btn_mc.arrow_mc.play();
		}
		
		function movie_mc_out(evt:MouseEvent)
		{
			//m_movie_mc.btnBg_mc.gotoAndStop(2);			
		}		

		function movie_mc_click(evt:MouseEvent)
		{
			//if (ProcessOutTable_Frame2.isKickRoom){
				ProcessOutTable_Frame2.clickRoom(objR.RoomID);			
				//ProcessOutTable_Frame2.isKickRoom = true ;
			//}
			//m_movie_mc.btnBg_mc.gotoAndStop(1) ;
		}
	}

}